/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Nordinator
 */
@Entity
@Table(name="CHANSON")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Chanson.findAll", query = "SELECT c FROM Chanson c")})
public class Chanson implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String titre;
    private String emplacement;
    private String genre;

    
    /**
     * Default Constructor
     */
    public Chanson(){
        
    }
    
    /**
     * Constructor
     * @param titre
     * @param emplacement 
     */
    public Chanson(String titre, String emplacement,String genre){
        this.titre = titre;
        this.emplacement = emplacement;
        this.genre = genre;
    }
    
    /**
     * Get the value of genre
     *
     * @return the value of genre
     */
    public String getGenre() {
        return genre;
    }

    /**
     * Set the value of genre
     *
     * @param genre new value of genre
     */
    public void setGenre(String genre) {
        this.genre = genre;
    }


    
    /**
     * Get the value of emplacement
     *
     * @return the value of emplacement
     */
    public String getEmplacement() {
        return emplacement;
    }
    

    /**
     * Set the value of emplacement
     *
     * @param emplacement new value of emplacement
     */
    public void setEmplacement(String emplacement) {
        this.emplacement = emplacement;
    }


    /**
     * Get the value of titre
     *
     * @return the value of titre
     */
    public String getTitre() {
        return titre;
    }

    /**
     * Set the value of titre
     *
     * @param titre new value of titre
     */
    public void setTitre(String titre) {
        this.titre = titre;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Chanson)) {
            return false;
        }
        Chanson other = (Chanson) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Chanson[ id=" + id + " ]";
    }
    
}
